import { IsString, IsNotEmpty, MaxLength, IsOptional } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class CreateTeamDto {
  @ApiProperty({
    description: '团队名称',
    example: '产品研发团队',
    maxLength: 100,
  })
  @IsString()
  @IsNotEmpty({ message: '团队名称不能为空' })
  @MaxLength(100, { message: '团队名称不能超过100个字符' })
  name: string;

  @ApiPropertyOptional({
    description: '团队描述',
    example: '负责产品的研发和维护工作',
  })
  @IsOptional()
  @IsString()
  description?: string;
}
